3.5.35 \(\int (g+h x)^2 (a+b \log (c (d (e+f x)^p)^q))^3 \, dx\) [435]

3.5.35.1 Optimal result
3.5.35.2 Mathematica [A] (verified)
3.5.35.3 Rubi [A] (verified)
3.5.35.4 Maple [B] (verified)
3.5.35.5 Fricas [B] (verification not implemented)
3.5.35.6 Sympy [B] (verification not implemented)
3.5.35.7 Maxima [B] (verification not implemented)
3.5.35.8 Giac [B] (verification not implemented)
3.5.35.9 Mupad [B] (verification not implemented)

3.5.35.1 Optimal result

Integrand size = 28, antiderivative size = 492 \[ \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\frac {6 a b^2 (f g-e h)^2 p^2 q^2 x}{f^2}-\frac {6 b^3 (f g-e h)^2 p^3 q^3 x}{f^2}-\frac {3 b^3 h (f g-e h) p^3 q^3 (e+f x)^2}{4 f^3}-\frac {2 b^3 h^2 p^3 q^3 (e+f x)^3}{27 f^3}+\frac {6 b^3 (f g-e h)^2 p^2 q^2 (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f^3}+\frac {3 b^2 h (f g-e h) p^2 q^2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 f^3}+\frac {2 b^2 h^2 p^2 q^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 f^3}-\frac {3 b (f g-e h)^2 p q (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^3}-\frac {3 b h (f g-e h) p q (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 f^3}-\frac {b h^2 p q (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 f^3}+\frac {(f g-e h)^2 (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h (f g-e h) (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{3 f^3} \]

output
6*a*b^2*(-e*h+f*g)^2*p^2*q^2*x/f^2-6*b^3*(-e*h+f*g)^2*p^3*q^3*x/f^2-3/4*b^ 
3*h*(-e*h+f*g)*p^3*q^3*(f*x+e)^2/f^3-2/27*b^3*h^2*p^3*q^3*(f*x+e)^3/f^3+6* 
b^3*(-e*h+f*g)^2*p^2*q^2*(f*x+e)*ln(c*(d*(f*x+e)^p)^q)/f^3+3/2*b^2*h*(-e*h 
+f*g)*p^2*q^2*(f*x+e)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))/f^3+2/9*b^2*h^2*p^2*q^ 
2*(f*x+e)^3*(a+b*ln(c*(d*(f*x+e)^p)^q))/f^3-3*b*(-e*h+f*g)^2*p*q*(f*x+e)*( 
a+b*ln(c*(d*(f*x+e)^p)^q))^2/f^3-3/2*b*h*(-e*h+f*g)*p*q*(f*x+e)^2*(a+b*ln( 
c*(d*(f*x+e)^p)^q))^2/f^3-1/3*b*h^2*p*q*(f*x+e)^3*(a+b*ln(c*(d*(f*x+e)^p)^ 
q))^2/f^3+(-e*h+f*g)^2*(f*x+e)*(a+b*ln(c*(d*(f*x+e)^p)^q))^3/f^3+h*(-e*h+f 
*g)*(f*x+e)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^3/f^3+1/3*h^2*(f*x+e)^3*(a+b*ln( 
c*(d*(f*x+e)^p)^q))^3/f^3
 
3.5.35.2 Mathematica [A] (verified)

Time = 0.19 (sec) , antiderivative size = 378, normalized size of antiderivative = 0.77 \[ \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\frac {108 (f g-e h)^2 (e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3+108 h (f g-e h) (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3+36 h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3-324 b (f g-e h)^2 p q \left ((e+f x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2-2 b p q \left (f (a-b p q) x+b (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )-81 b h (f g-e h) p q \left (2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2+b p q \left (b f p q x (2 e+f x)-2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )\right )-4 b h^2 p q \left (9 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2+2 b p q \left (b f p q x \left (3 e^2+3 e f x+f^2 x^2\right )-3 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )\right )\right )}{108 f^3} \]

input
Integrate[(g + h*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^3,x]
 
output
(108*(f*g - e*h)^2*(e + f*x)*(a + b*Log[c*(d*(e + f*x)^p)^q])^3 + 108*h*(f 
*g - e*h)*(e + f*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^3 + 36*h^2*(e + f*x 
)^3*(a + b*Log[c*(d*(e + f*x)^p)^q])^3 - 324*b*(f*g - e*h)^2*p*q*((e + f*x 
)*(a + b*Log[c*(d*(e + f*x)^p)^q])^2 - 2*b*p*q*(f*(a - b*p*q)*x + b*(e + f 
*x)*Log[c*(d*(e + f*x)^p)^q])) - 81*b*h*(f*g - e*h)*p*q*(2*(e + f*x)^2*(a 
+ b*Log[c*(d*(e + f*x)^p)^q])^2 + b*p*q*(b*f*p*q*x*(2*e + f*x) - 2*(e + f* 
x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q]))) - 4*b*h^2*p*q*(9*(e + f*x)^3*(a + 
b*Log[c*(d*(e + f*x)^p)^q])^2 + 2*b*p*q*(b*f*p*q*x*(3*e^2 + 3*e*f*x + f^2* 
x^2) - 3*(e + f*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q]))))/(108*f^3)
 
3.5.35.3 Rubi [A] (verified)

Time = 1.26 (sec) , antiderivative size = 492, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.107, Rules used = {2895, 2848, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx\)

\(\Big \downarrow \) 2895

\(\displaystyle \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3dx\)

\(\Big \downarrow \) 2848

\(\displaystyle \int \left (\frac {(f g-e h)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^2}+\frac {2 h (e+f x) (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^2}+\frac {h^2 (e+f x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^2}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {3 b^2 h p^2 q^2 (e+f x)^2 (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 f^3}+\frac {2 b^2 h^2 p^2 q^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{9 f^3}+\frac {6 a b^2 p^2 q^2 x (f g-e h)^2}{f^2}-\frac {3 b h p q (e+f x)^2 (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{2 f^3}-\frac {3 b p q (e+f x) (f g-e h)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{f^3}+\frac {h (e+f x)^2 (f g-e h) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}+\frac {(e+f x) (f g-e h)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{f^3}-\frac {b h^2 p q (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^2}{3 f^3}+\frac {h^2 (e+f x)^3 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3}{3 f^3}+\frac {6 b^3 p^2 q^2 (e+f x) (f g-e h)^2 \log \left (c \left (d (e+f x)^p\right )^q\right )}{f^3}-\frac {3 b^3 h p^3 q^3 (e+f x)^2 (f g-e h)}{4 f^3}-\frac {2 b^3 h^2 p^3 q^3 (e+f x)^3}{27 f^3}-\frac {6 b^3 p^3 q^3 x (f g-e h)^2}{f^2}\)

input
Int[(g + h*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q])^3,x]
 
output
(6*a*b^2*(f*g - e*h)^2*p^2*q^2*x)/f^2 - (6*b^3*(f*g - e*h)^2*p^3*q^3*x)/f^ 
2 - (3*b^3*h*(f*g - e*h)*p^3*q^3*(e + f*x)^2)/(4*f^3) - (2*b^3*h^2*p^3*q^3 
*(e + f*x)^3)/(27*f^3) + (6*b^3*(f*g - e*h)^2*p^2*q^2*(e + f*x)*Log[c*(d*( 
e + f*x)^p)^q])/f^3 + (3*b^2*h*(f*g - e*h)*p^2*q^2*(e + f*x)^2*(a + b*Log[ 
c*(d*(e + f*x)^p)^q]))/(2*f^3) + (2*b^2*h^2*p^2*q^2*(e + f*x)^3*(a + b*Log 
[c*(d*(e + f*x)^p)^q]))/(9*f^3) - (3*b*(f*g - e*h)^2*p*q*(e + f*x)*(a + b* 
Log[c*(d*(e + f*x)^p)^q])^2)/f^3 - (3*b*h*(f*g - e*h)*p*q*(e + f*x)^2*(a + 
 b*Log[c*(d*(e + f*x)^p)^q])^2)/(2*f^3) - (b*h^2*p*q*(e + f*x)^3*(a + b*Lo 
g[c*(d*(e + f*x)^p)^q])^2)/(3*f^3) + ((f*g - e*h)^2*(e + f*x)*(a + b*Log[c 
*(d*(e + f*x)^p)^q])^3)/f^3 + (h*(f*g - e*h)*(e + f*x)^2*(a + b*Log[c*(d*( 
e + f*x)^p)^q])^3)/f^3 + (h^2*(e + f*x)^3*(a + b*Log[c*(d*(e + f*x)^p)^q]) 
^3)/(3*f^3)
 

3.5.35.3.1 Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2848
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)*((f_.) + (g_. 
)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(f + g*x)^q*(a + b*Log[c*(d 
 + e*x)^n])^p, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && NeQ[e*f - 
 d*g, 0] && IGtQ[q, 0]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
3.5.35.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(2033\) vs. \(2(478)=956\).

Time = 16.19 (sec) , antiderivative size = 2034, normalized size of antiderivative = 4.13

method result size
parallelrisch \(\text {Expression too large to display}\) \(2034\)

input
int((h*x+g)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))^3,x,method=_RETURNVERBOSE)
 
output
1/108*(648*x*ln(c*(d*(f*x+e)^p)^q)*a*b^2*e*f^2*g*h*p*q-972*x*ln(c*(d*(f*x+ 
e)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)^2*b^3*e^2*f*h^2*p*q+396*x*a*b^2*e^2*f*h^2*p^2*q^2+972*ln(c*(d*( 
f*x+e)^p)^q)*b^3*e^2*f*g*h*p^2*q^2+54*x^2*a^2*b*e*f^2*h^2*p*q-162*x^2*a^2* 
b*f^3*g*h*p*q-648*x*ln(c*(d*(f*x+e)^p)^q)*a*b^2*f^3*g^2*p*q+486*ln(c*(d*(f 
*x+e)^p)^q)^2*b^3*e^2*f*g*h*p*q+324*a^2*b*e*f^2*g^2*p*q-1134*b^3*e^2*f*g*h 
*p^3*q^3-648*a*b^2*e*f^2*g^2*p^2*q^2-81*x^2*b^3*f^3*g*h*p^3*q^3-36*x^3*...
 
3.5.35.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 3121 vs. \(2 (478) = 956\).

Time = 0.38 (sec) , antiderivative size = 3121, normalized size of antiderivative = 6.34 \[ \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\text {Too large to display} \]

input
integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="fricas")
 
output
-1/108*(4*(2*b^3*f^3*h^2*p^3*q^3 - 6*a*b^2*f^3*h^2*p^2*q^2 + 9*a^2*b*f^3*h 
^2*p*q - 9*a^3*f^3*h^2)*x^3 - 36*(b^3*f^3*h^2*p^3*q^3*x^3 + 3*b^3*f^3*g*h* 
p^3*q^3*x^2 + 3*b^3*f^3*g^2*p^3*q^3*x + (3*b^3*e*f^2*g^2 - 3*b^3*e^2*f*g*h 
 + b^3*e^3*h^2)*p^3*q^3)*log(f*x + e)^3 - 36*(b^3*f^3*h^2*x^3 + 3*b^3*f^3* 
g*h*x^2 + 3*b^3*f^3*g^2*x)*log(c)^3 - 36*(b^3*f^3*h^2*q^3*x^3 + 3*b^3*f^3* 
g*h*q^3*x^2 + 3*b^3*f^3*g^2*q^3*x)*log(d)^3 - 3*(36*a^3*f^3*g*h - (27*b^3* 
f^3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[B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1846 vs. \(2 (481) = 962\).

Time = 5.38 (sec) , antiderivative size = 1846, normalized size of antiderivative = 3.75 \[ \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\text {Too large to display} \]

input
integrate((h*x+g)**2*(a+b*ln(c*(d*(f*x+e)**p)**q))**3,x)
 
output
Piecewise((a**3*g**2*x + a**3*g*h*x**2 + a**3*h**2*x**3/3 + a**2*b*e**3*h* 
*2*log(c*(d*(e + f*x)**p)**q)/f**3 - 3*a**2*b*e**2*g*h*log(c*(d*(e + f*x)* 
*p)**q)/f**2 - a**2*b*e**2*h**2*p*q*x/f**2 + 3*a**2*b*e*g**2*log(c*(d*(e + 
 f*x)**p)**q)/f + 3*a**2*b*e*g*h*p*q*x/f + a**2*b*e*h**2*p*q*x**2/(2*f) - 
3*a**2*b*g**2*p*q*x + 3*a**2*b*g**2*x*log(c*(d*(e + f*x)**p)**q) - 3*a**2* 
b*g*h*p*q*x**2/2 + 3*a**2*b*g*h*x**2*log(c*(d*(e + f*x)**p)**q) - a**2*b*h 
**2*p*q*x**3/3 + a**2*b*h**2*x**3*log(c*(d*(e + f*x)**p)**q) - 11*a*b**2*e 
**3*h**2*p*q*log(c*(d*(e + f*x)**p)**q)/(3*f**3) + a*b**2*e**3*h**2*log(c* 
(d*(e + f*x)**p)**q)**2/f**3 + 9*a*b**2*e**2*g*h*p*q*log(c*(d*(e + f*x)**p 
)**q)/f**2 - 3*a*b**2*e**2*g*h*log(c*(d*(e + f*x)**p)**q)**2/f**2 + 11*a*b 
**2*e**2*h**2*p**2*q**2*x/(3*f**2) - 2*a*b**2*e**2*h**2*p*q*x*log(c*(d*(e 
+ f*x)**p)**q)/f**2 - 6*a*b**2*e*g**2*p*q*log(c*(d*(e + f*x)**p)**q)/f + 3 
*a*b**2*e*g**2*log(c*(d*(e + f*x)**p)**q)**2/f - 9*a*b**2*e*g*h*p**2*q**2* 
x/f + 6*a*b**2*e*g*h*p*q*x*log(c*(d*(e + f*x)**p)**q)/f - 5*a*b**2*e*h**2* 
p**2*q**2*x**2/(6*f) + a*b**2*e*h**2*p*q*x**2*log(c*(d*(e + f*x)**p)**q)/f 
 + 6*a*b**2*g**2*p**2*q**2*x - 6*a*b**2*g**2*p*q*x*log(c*(d*(e + f*x)**p)* 
*q) + 3*a*b**2*g**2*x*log(c*(d*(e + f*x)**p)**q)**2 + 3*a*b**2*g*h*p**2*q* 
*2*x**2/2 - 3*a*b**2*g*h*p*q*x**2*log(c*(d*(e + f*x)**p)**q) + 3*a*b**2*g* 
h*x**2*log(c*(d*(e + f*x)**p)**q)**2 + 2*a*b**2*h**2*p**2*q**2*x**3/9 - 2* 
a*b**2*h**2*p*q*x**3*log(c*(d*(e + f*x)**p)**q)/3 + a*b**2*h**2*x**3*lo...
 
3.5.35.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1245 vs. \(2 (478) = 956\).

Time = 0.25 (sec) , antiderivative size = 1245, normalized size of antiderivative = 2.53 \[ \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\text {Too large to display} \]

input
integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="maxima")
 
output
1/3*b^3*h^2*x^3*log(((f*x + e)^p*d)^q*c)^3 + a*b^2*h^2*x^3*log(((f*x + e)^ 
p*d)^q*c)^2 + b^3*g*h*x^2*log(((f*x + e)^p*d)^q*c)^3 - 3*a^2*b*f*g^2*p*q*( 
x/f - e*log(f*x + e)/f^2) + 1/6*a^2*b*f*h^2*p*q*(6*e^3*log(f*x + e)/f^4 - 
(2*f^2*x^3 - 3*e*f*x^2 + 6*e^2*x)/f^3) - 3/2*a^2*b*f*g*h*p*q*(2*e^2*log(f* 
x + e)/f^3 + (f*x^2 - 2*e*x)/f^2) + a^2*b*h^2*x^3*log(((f*x + e)^p*d)^q*c) 
 + 3*a*b^2*g*h*x^2*log(((f*x + e)^p*d)^q*c)^2 + b^3*g^2*x*log(((f*x + e)^p 
*d)^q*c)^3 + 1/3*a^3*h^2*x^3 + 3*a^2*b*g*h*x^2*log(((f*x + e)^p*d)^q*c) + 
3*a*b^2*g^2*x*log(((f*x + e)^p*d)^q*c)^2 + a^3*g*h*x^2 + 3*a^2*b*g^2*x*log 
(((f*x + e)^p*d)^q*c) - 3*(2*f*p*q*(x/f - e*log(f*x + e)/f^2)*log(((f*x + 
e)^p*d)^q*c) + (e*log(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*p^2*q^2/f)*a* 
b^2*g^2 - (3*f*p*q*(x/f - e*log(f*x + e)/f^2)*log(((f*x + e)^p*d)^q*c)^2 - 
 ((e*log(f*x + e)^3 + 3*e*log(f*x + e)^2 - 6*f*x + 6*e*log(f*x + e))*p^2*q 
^2/f^2 - 3*(e*log(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*p*q*log(((f*x + e 
)^p*d)^q*c)/f^2)*f*p*q)*b^3*g^2 - 3/2*(2*f*p*q*(2*e^2*log(f*x + e)/f^3 + ( 
f*x^2 - 2*e*x)/f^2)*log(((f*x + e)^p*d)^q*c) - (f^2*x^2 + 2*e^2*log(f*x + 
e)^2 - 6*e*f*x + 6*e^2*log(f*x + e))*p^2*q^2/f^2)*a*b^2*g*h - 1/4*(6*f*p*q 
*(2*e^2*log(f*x + e)/f^3 + (f*x^2 - 2*e*x)/f^2)*log(((f*x + e)^p*d)^q*c)^2 
 + ((4*e^2*log(f*x + e)^3 + 3*f^2*x^2 + 18*e^2*log(f*x + e)^2 - 42*e*f*x + 
 42*e^2*log(f*x + e))*p^2*q^2/f^3 - 6*(f^2*x^2 + 2*e^2*log(f*x + e)^2 - 6* 
e*f*x + 6*e^2*log(f*x + e))*p*q*log(((f*x + e)^p*d)^q*c)/f^3)*f*p*q)*b^...
 
3.5.35.8 Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 5146 vs. \(2 (478) = 956\).

Time = 0.42 (sec) , antiderivative size = 5146, normalized size of antiderivative = 10.46 \[ \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\text {Too large to display} \]

input
integrate((h*x+g)^2*(a+b*log(c*(d*(f*x+e)^p)^q))^3,x, algorithm="giac")
 
output
1/108*(108*(f*x + e)*b^3*f^2*g^2*p^3*q^3*log(f*x + e)^3 + 108*(f*x + e)^2* 
b^3*f*g*h*p^3*q^3*log(f*x + e)^3 - 216*(f*x + e)*b^3*e*f*g*h*p^3*q^3*log(f 
*x + e)^3 + 36*(f*x + e)^3*b^3*h^2*p^3*q^3*log(f*x + e)^3 - 108*(f*x + e)^ 
2*b^3*e*h^2*p^3*q^3*log(f*x + e)^3 + 108*(f*x + e)*b^3*e^2*h^2*p^3*q^3*log 
(f*x + e)^3 - 324*(f*x + e)*b^3*f^2*g^2*p^3*q^3*log(f*x + e)^2 - 162*(f*x 
+ e)^2*b^3*f*g*h*p^3*q^3*log(f*x + e)^2 + 648*(f*x + e)*b^3*e*f*g*h*p^3*q^ 
3*log(f*x + e)^2 - 36*(f*x + e)^3*b^3*h^2*p^3*q^3*log(f*x + e)^2 + 162*(f* 
x + e)^2*b^3*e*h^2*p^3*q^3*log(f*x + e)^2 - 324*(f*x + e)*b^3*e^2*h^2*p^3* 
q^3*log(f*x + e)^2 + 324*(f*x + e)*b^3*f^2*g^2*p^2*q^3*log(f*x + e)^2*log( 
d) + 324*(f*x + e)^2*b^3*f*g*h*p^2*q^3*log(f*x + e)^2*log(d) - 648*(f*x + 
e)*b^3*e*f*g*h*p^2*q^3*log(f*x + e)^2*log(d) + 108*(f*x + e)^3*b^3*h^2*p^2 
*q^3*log(f*x + e)^2*log(d) - 324*(f*x + e)^2*b^3*e*h^2*p^2*q^3*log(f*x + e 
)^2*log(d) + 324*(f*x + e)*b^3*e^2*h^2*p^2*q^3*log(f*x + e)^2*log(d) + 648 
*(f*x + e)*b^3*f^2*g^2*p^3*q^3*log(f*x + e) + 162*(f*x + e)^2*b^3*f*g*h*p^ 
3*q^3*log(f*x + e) - 1296*(f*x + e)*b^3*e*f*g*h*p^3*q^3*log(f*x + e) + 24* 
(f*x + e)^3*b^3*h^2*p^3*q^3*log(f*x + e) - 162*(f*x + e)^2*b^3*e*h^2*p^3*q 
^3*log(f*x + e) + 648*(f*x + e)*b^3*e^2*h^2*p^3*q^3*log(f*x + e) + 324*(f* 
x + e)*b^3*f^2*g^2*p^2*q^2*log(f*x + e)^2*log(c) + 324*(f*x + e)^2*b^3*f*g 
*h*p^2*q^2*log(f*x + e)^2*log(c) - 648*(f*x + e)*b^3*e*f*g*h*p^2*q^2*log(f 
*x + e)^2*log(c) + 108*(f*x + e)^3*b^3*h^2*p^2*q^2*log(f*x + e)^2*log(c...
 
3.5.35.9 Mupad [B] (verification not implemented)

Time = 2.34 (sec) , antiderivative size = 1400, normalized size of antiderivative = 2.85 \[ \int (g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )^3 \, dx=\text {Too large to display} \]

input
int((g + h*x)^2*(a + b*log(c*(d*(e + f*x)^p)^q))^3,x)
 
output
x*((18*a^3*f^2*g^2 - 66*b^3*e^2*h^2*p^3*q^3 - 108*b^3*f^2*g^2*p^3*q^3 + 36 
*a^3*e*f*g*h + 36*a*b^2*e^2*h^2*p^2*q^2 + 108*a*b^2*f^2*g^2*p^2*q^2 - 54*a 
^2*b*f^2*g^2*p*q + 162*b^3*e*f*g*h*p^3*q^3 - 108*a*b^2*e*f*g*h*p^2*q^2)/(1 
8*f^2) - (e*((h*(6*a^3*e*h + 12*a^3*f*g + 5*b^3*e*h*p^3*q^3 - 9*b^3*f*g*p^ 
3*q^3 - 18*a^2*b*f*g*p*q - 6*a*b^2*e*h*p^2*q^2 + 18*a*b^2*f*g*p^2*q^2))/(6 
*f) - (e*h^2*(9*a^3 - 2*b^3*p^3*q^3 + 6*a*b^2*p^2*q^2 - 9*a^2*b*p*q))/(9*f 
)))/f) + log(c*(d*(e + f*x)^p)^q)^2*(x^2*((3*b^2*h*(a*e*h + 2*a*f*g - b*f* 
g*p*q))/(2*f) - (b^2*e*h^2*(3*a - b*p*q))/(2*f)) - x*((e*((3*b^2*h*(a*e*h 
+ 2*a*f*g - b*f*g*p*q))/f - (b^2*e*h^2*(3*a - b*p*q))/f))/f - (3*b^2*g*(2* 
a*e*h + a*f*g - b*f*g*p*q))/f) + (e*(6*a*b^2*e^2*h^2 + 18*a*b^2*f^2*g^2 - 
11*b^3*e^2*h^2*p*q - 18*b^3*f^2*g^2*p*q - 18*a*b^2*e*f*g*h + 27*b^3*e*f*g* 
h*p*q))/(6*f^3) + (b^2*h^2*x^3*(3*a - b*p*q))/3) + log(c*(d*(e + f*x)^p)^q 
)^3*(b^3*g^2*x + (b^3*h^2*x^3)/3 + (e*(b^3*e^2*h^2 + 3*b^3*f^2*g^2 - 3*b^3 
*e*f*g*h))/(3*f^3) + b^3*g*h*x^2) + x^2*((h*(6*a^3*e*h + 12*a^3*f*g + 5*b^ 
3*e*h*p^3*q^3 - 9*b^3*f*g*p^3*q^3 - 18*a^2*b*f*g*p*q - 6*a*b^2*e*h*p^2*q^2 
 + 18*a*b^2*f*g*p^2*q^2))/(12*f) - (e*h^2*(9*a^3 - 2*b^3*p^3*q^3 + 6*a*b^2 
*p^2*q^2 - 9*a^2*b*p*q))/(18*f)) + (log(e + f*x)*(85*b^3*e^3*h^2*p^3*q^3 - 
 66*a*b^2*e^3*h^2*p^2*q^2 + 108*b^3*e*f^2*g^2*p^3*q^3 + 18*a^2*b*e^3*h^2*p 
*q - 108*a*b^2*e*f^2*g^2*p^2*q^2 + 54*a^2*b*e*f^2*g^2*p*q - 189*b^3*e^2*f* 
g*h*p^3*q^3 + 162*a*b^2*e^2*f*g*h*p^2*q^2 - 54*a^2*b*e^2*f*g*h*p*q))/(1...